<?php




class SkinApi extends ApiBase{

	private static $style = 'default';
	
	
	/**
	 * 构造函数，初始化插件
	 */
	public function __construct() {
		parent::__construct();
	}
	
	public function set($style){
		define('N_STYLE',$style);
	}

	private $data = array("color"=>1,"code"=>"m3");
	public function getStyle($id){
		return $this->data;
		return n_api("mysql")->db001->get("skin_style",$id);
	}
	public function getAllStyle(){
		return array($this->data);
		return n_api("mysql")->db001->select("select * from skin_style");
	}
	public function getStyleByScode($scode){
		return $this->data;
		return n_api("mysql")->db001->fetchFirst("select b.* from skin_main as a left join skin_style as b on a.style_id=b.id where a.scode='{$scode}'");
	}
	
}